package com.deng.maintenance.data;

import java.text.Collator;
import java.util.Comparator;

import com.deng.maintenance.vo.VoteVsOrganizationVo;

public class ComparatorFullOrganizationName implements Comparator {

	public int compare(Object arg0, Object arg1) {
		
		VoteVsOrganizationVo user0=(VoteVsOrganizationVo)arg0;
		VoteVsOrganizationVo user1=(VoteVsOrganizationVo)arg1;

		   //首先比较年龄，如果年龄相同，则比较名字
		return Collator.getInstance(java.util.Locale.CHINA).compare(user0.organization_long_name, user1.organization_long_name); 
//		int flag = user0.organization_long_name.compareTo(user1.organization_long_name);
//		if ( flag == 0 ){
//			return (user0.organization_id > user1.organization_id) ? 1 : 0;
//		}else{
//			return flag;
//		}  
	}

}
